﻿@inherits Vowei.Web.G18nWebViewPage<Vowei.Web.Models.LogOnModel>
@using Vowei.Web.Models
@using System.Web.Mvc.Html 

@{
    ViewBag.Title = T("用户登录");
    
}

<h2>@T("登录")</h2>
@if (string.IsNullOrEmpty(Context.User.Identity.Name))
{
    <p>@string.Format(T("请输入用户名和密码以便登录系统，如果尚未拥有用户名，请 {0} 一个新的帐号"),  Html.ActionLink(T("注册"), "Register"))</p>
}
else
{
    <p>@T("你没有权限访问指定的资源，如果需要访问受限资源，请使用其它用户身份登录系统。")</p>
}

@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")

@using (Html.BeginForm())
{
    <div>
        <fieldset>
            <legend>@T("帐户信息")</legend>

            <div class="editor-label">
                @T(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>

            <div class="editor-label">
                @T(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

			<div class="editor-label">
			    @T(m => m.LogOnChannel)
			</div>
			<div class="editor-field">
			    @Html.RadioButton("LogOnChannel", LogOnChannel.Form, true) @("网站帐号")&nbsp;&nbsp;
			    @Html.RadioButton("LogOnChannel", LogOnChannel.MicrosoftLive) @("微软Live帐号")&nbsp;&nbsp;
			    @Html.RadioButton("LogOnChannel", LogOnChannel.GoogleTalk) @("Gmail帐号")
			</div>

            <div class="editor-label">
                @Html.CheckBoxFor(m => m.RememberMe)
                @T(m => m.RememberMe)
            </div>
            <p>
                <input type="submit" value="@("登录")" />
            </p>
        </fieldset>
    </div>
}
